package com.springday2mybatis;

import com.springday2mybatis.config.SpringConfig;
import com.springday2mybatis.domain.Account;
import com.springday2mybatis.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App3 {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);

        AccountService accountService = ctx.getBean(AccountService.class);

        Account account = accountService.findById(2);

        System.out.println("account" + account);
    }
}
